/**
 @file sys_tmm_l3if.h

 @date 2018-11-12

 @version v1.0

 The file contains tmm l3if funcation
*/

#ifndef _SYS_TMM_L3IF_H
#define _SYS_TMM_L3IF_H
#ifdef __cplusplus
extern "C" {
#endif

/****************************************************************
 *
 * Header Files
 *
 ***************************************************************/
#include "sys_usw_l3if.h"

/***************************************************************
 *
 *  Defines and Macros
 *
 ***************************************************************/

/***************************************************************
 *
 *  Functions
 *
 ***************************************************************/

struct sys_l3if_rmac_entry_master_s
{
    ctc_hash_t * rmac_hash;
    ctc_fpa_t* rmac_fpa;
    sys_l3if_rmac_block_t* rmac_block;
};
typedef struct sys_l3if_rmac_entry_master_s sys_l3if_rmac_entry_master_t;

struct sys_tmm_l3if_rtmac_s
{
    mac_addr_t mac;
    uint16 key_index;
};
typedef struct sys_tmm_l3if_rtmac_s sys_tmm_l3if_rtmac_t;


extern int32
sys_tmm_l3if_set_igs_if_rmac(uint8 lchip, uint16 l3if_id, ctc_l3if_router_mac_t router_mac);
extern int32
sys_tmm_l3if_set_system_router_mac(uint8 lchip, mac_addr_t mac_addr);
extern int32
sys_tmm_l3if_db_init(uint8 lchip, uint8 deinit);
extern int32
sys_tmm_l3if_wb_rtmac_restore(uint8 lchip);
extern int32
sys_tmm_l3if_add_router_mac_entry(uint8 lchip, uint32 entry_id, ctc_l3if_rmac_entry_t* rmac_entry);
extern int32
sys_tmm_l3if_remove_router_mac_entry(uint8 lchip, uint32 entry_id);
extern int32
sys_tmm_l3if_get_router_mac_entry(uint8 lchip, uint32 entry_id, ctc_l3if_rmac_entry_t* rmac_entry);
extern int32
sys_tmm_l3if_show_router_mac_entry(uint8 lchip, uint32 entry_id);
extern int32
sys_tmm_l3if_wb_rtmac_sync(uint8 lchip,uint32 app_id);
extern int32
sys_tmm_l3if_dump_db(uint8 lchip, sal_file_t p_f,ctc_global_dump_db_t* p_dump_param);

#ifdef __cplusplus
}
#endif

#endif

